package oop.core;

public class InvMouseListenerTester {
	
	public static void main(String[] args){
		for (int x=0; x<400; x=x+15 ){
			for(int y=0;y<200;y=y+15){
				System.out.println("X:"+x+", Y:"+y);
				System.out.println("Inventory:"+gutsCheckI(x,y));
				System.out.println("Equipment:"+gutsCheckE(x,y)+"\n\n");
				
			}
		}
	}
	
	public static int gutsCheckI(int x, int y){
		int codeX = x/50;
		int codeY = y/50;
		int checkX= x%50;
		int checkY= y%50;
		if ((codeX>7)||(codeY>3)){
			return -1;
		}
		if ((checkX<=10)||(checkY<=10)){
			return -1;
		}
		int code=codeY*8+codeX;
		return code;
	}
	
	public static int gutsCheckE(int x, int y){
		if((180>y)||(220<y)){
			return-1;
		}
		int codeX=x/73;
		int checkX=x%73;
		if((checkX<33)||(codeX>4)){
			return-1;
		}
		return codeX;
	}
}
